package com.mao.controller;

import com.mao.pojo.User;
import com.mao.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 小毛同学
 * @version 1.0
 * @data 2022/3/4 14:45
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("{id}")
    public User queryById(@PathVariable("id") int  id){
        return userService.queryById(id);

    }

}
